Delimiting the Scope of Eeects
نویسنده
چکیده
Program fragments in functional languages may be observationally congruent in a language without eeects (continuations, state, exceptions) but not in an extension with eeects. We give a generic way to preserve pure functional congruences by means of an eeects delimiter. The eeects delimiter is deened semantically using the retraction techniques of 14], but can also be given an operational semantics. We show that the eeects delim-iter restores observational congruences between purely functional pieces of code, thus achieving a modular separation between the purely functional language and its extensions. 1 Introduction Functional programming is a powerful paradigm, but it has long been recognized that purely functional programs are often ineecient and cumbersome. Many modern functional languages, e.g., SML 9], build in control and state features that strictly fall outside the functional paradigm. For example, SML of New Jersey includes a \call-with-current-continuation" operation callcc, an exception-handling mechanism, and the ability to manipulate state using references, assignment, and deref-erencing operations. The extensions are not simple extensions of underlying semantics of the language: old equivalences between pieces of code not involving the new constructs may fail to be correct in the extension. In order to make the discussion more concrete, consider a call-by-value version of the simply-typed programming language PCF. Call-by-value PCF|VPCF for short|is a functional language with numerals, basic arithmetic operations, recursion, and a conditional test for zero. Section 2 describes the full language for those unfamiliar with the syntax and operational semantics of VPCF. In essence, VPCF is a simpliied form of the purely functional fragment of SML.
منابع مشابه
تحلیل انتقادی قانون تعیین حدود مسئولیت شرکتهای هواپیمایی ایرانی مصوب 11/5/1391
Liability of air carriers especially in respect of liability limits has been subject of various regulations in both domestic and international levels. Our country by ratifying 1929 Warsaw convention and subsequent protocols in 1976 has regulated liability limits of Iranian airlines in various milestones including 1980, 1982 and 1984 and finally passed the Act of Delimiting Liability of Iran...
متن کاملMICROMORPHOLOGY OF SEED IN SOME VICIA SPECIES FROM IRAN
The morphology of 11 species of the genus Vicia from Iran was studied using Scanning Electron Microscopy (SEM). The main pattern in seed coat sculpturing in the species was papillose, but the size and the number of side ribs in papillae and the density of papillae, were different in various species. Four morphological characters of seeds: relative hilum length and shape, relative position of th...
متن کاملThe Marriage of Eeects and Monads
Giiord and others proposed an eeect typing discipline to delimit the scope of computational eeects within a program, while Moggi and others proposed monads for much the same purpose. Here we marry eeects to monads, uniting two previously separate lines of research. In particular, we show that the type, region, and eeect system of Talpin and Jou-velot carries over directly to an analogous system...
متن کاملParsing with Dynamic Continuized CCG
We present an implemented method of parsing with Combinatory Categorial Grammar (CCG) that for the first time derives the exceptional scope behavior of indefinites in a principled and plausibly practical way. The account implements Charlow’s (2014) monadic approach to dynamic semantics, in which indefinites’ exceptional scope taking follows from the way the side effect of introducing a discours...
متن کامل4. Types of coordinands
1. Overview 2. Types and positions of coordinators 2.1. Asyndetic coordination 2.2. Monosyndetic coordination 2.3 Bisyndetic coordination 2.4. Multiple coordinands 2.5. The scope of coordinators 3. Contrastive coordination 3.1. Conjunction and disjunction 3.2. Contrastive negative coordination 4. Types of coordinands 5. Semantic sub-types of coordination 5.1. Semantic sub-types of conjunction 5...
متن کامل